home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 26 / q26.d81 / t.95 convertible < prev    next >
Text File  |  2022-08-28  |  8KB  |  175 lines

  1.  
  2.  
  3.                       ' 9 5   C O N V E R T I B L E
  4.  
  5.       Program and Text by Fender Tucker -- Data Entry by Nina Kreigh
  6.  
  7.  
  8.     It should come as no surprise to you that this program was inspired by
  9. a book.  I imagine most computer programs are inspired by books because a
  10. computer is a lot like a book, only interactive.  The book is a tiny
  11. paperback volume called "Pocket Ref" by Thomas J. Glover, published by
  12. Sequoia Publishing, Littletown CO, 1989.  It's 480 pages of tiny print,
  13. listing practically every tidbit of numerical data known to man.  I've seen
  14. more comprehensive compilations of knowledge before, but not in such a
  15. handy size.
  16.  
  17.     The Contents page lists topics such as Automotive, Carpentry,
  18. Chemistry, Electronics, Geology, Money, Plumbing, Tools, Weights and
  19. Measures, but the one that caught my eye was Conversions.  It's 57 pages of
  20. every measure you've ever heard of, and the factor you need to multiply the
  21. quantity by to convert that measure to almost any other relevant measure.
  22. I highlighted every measure that MIGHT pop up during an average person's
  23. lifetime and sent the book off to Mary Kreigh, a LOADSTAR beta tester.  Her
  24. daughter, Nina, volunteered to enter and check all of the data (no small
  25. task!) and the rest is history.
  26.  
  27.     We published a conversion program back on LS 128 #3 called 1989
  28. CONVERTIBLE.  This then is our conversion program for the 90s, and I must
  29. say that I'm pleased with its speed and ease of use.
  30.  
  31.  
  32.  THE PROGRAM SCREEN
  33.  ------------------
  34.  
  35.     It's a one-screen program.  Press H to see a Help window or Q to quit
  36. to LOADSTAR 128.  Other than those two keys, all you need are the CRSR keys
  37. and the keypad for entering numbers.  A joystick in port #2 will do the
  38. work of the CRSR keys, but you'll still need the keypad (or the regular
  39. number keys) to enter in values.
  40.  
  41.     There are four "windows" on the screen; two of them are one row tall
  42. and the other two are larger and can be scrolled.  The two small windows
  43. hold the VALUES of the two measurements and the two big windows hold the
  44. MEASURE NAMES.  To make things simple, let's call the windows (from left to
  45. right on the screen) A, B, C and D, with A and C being the one-row-tall
  46. "value" windows, and B and D being the scrolling MEASURE windows.
  47.  
  48.  
  49.  CONVERTING
  50.  ----------
  51.  
  52.     An example is probably the best way to describe the way the program
  53. works.  Let's say you'd like to know how many liters there are in 3.7
  54. gallons of water.  You'd move the red highlight bar (or "cursor") to the B
  55. window and scroll up or down until the highlight bar is on Gallons (US
  56. liquid).  Then move the bar to the A window and enter 3.7 by simply typing
  57. 3.7 and pressing RETURN.  The default value for Window A is 1.  Now move
  58. the cursor to the D window and scroll up or down until you find Liters.
  59. Stop on Liters and your answer will miraculously appear in the C window.
  60.  
  61.    3.7 Gallons (US Liquid) equals 14.00561 Liters
  62.  
  63.     As you can see, the program allows you to convert Gallons (US Liquid)
  64. to any of eleven different measures.  Note that scientific notation may be
  65. used in Windows A and C.  If you see
  66.  
  67.      5.7e7
  68.  
  69. this means 5.7 times 10 to the 7th power, or 57,000,000.  A minus number
  70. after the "e" means the reciprocal.  3e-8 equals 1 divided by 300,000,000.
  71.  
  72. NOTE: If you use huge numbers in Window A, there's a chance that the value
  73. in Window C may be so LONG that a digit of the exponent is cut off, making
  74. the answer off by at least a magnitude.  My advice is to use reasonable
  75. numbers of six digits or less in Window A.
  76.  
  77.     '95 CONVERTIBLE also allows you to convert the "other" way.  This means
  78. you can enter values into the C window and the amount in the A window will
  79. change accordingly.   Since not every MEASURE in the D window is found in
  80. the list for the B window, this is the only way to convert from some
  81. MEASUREs in D to the MEASURE in B.
  82.  
  83.  
  84.  CONVERSION FACTORS
  85.  ------------------
  86.  
  87.     There are just about 100 MEASURES in Window B.  Each of them has an
  88. average of about five or six MEASURES that it can be converted to.  As you
  89. can see, Nina did a lot of work!  In the book the value for Window C for
  90. each combination of MEASURES in B and D is given, assuming that the value
  91. in A is 1.  For instance, the conversion factor when Feet is in B and
  92. Inches is in D is 12.  One foot is assumed.
  93.  
  94.     This means you can add MEASURES of your own to the program, if you have
  95. a word processor that can load and save PETASCII PRG files.  THE WRITE
  96. STUFF does this wonderfully; in fact it was what Nina and I used to make
  97. the file called "conv data".
  98.  
  99.     Here's how to add data to the file with TWS.
  100.  
  101.  (1) Boot up TWS and press CTRL then A.  This puts you into the PETASCII
  102. mode.
  103.  
  104.  (2) Press CTRL then L to get the "Load" prompt.  Delete the "-" that TWS
  105. automatically places on the input line and enter "conv data,p,r".
  106.  
  107.  (3) When the file is loaded, garbage will appear on the screen.  Press
  108. CTRL then A and voila!  The file is ready to be edited.
  109.  
  110.  (4) Let's say you want to add factors for converting British money
  111. (pounds) into shillings, pence and farthings.  You need to know how many
  112. shillings in one pound, how many pence in a pound and how many farthings in
  113. a pound.  I have no idea, but I assume you do.  Look for lines that start
  114. with an asterisk.  Scroll down to the right alphabetical spot in the list
  115. and insert "*British Pounds" directly before an asterisked line.  The data
  116. doesn't have to be in alphabetical order, but it's better if it is, right?
  117.  
  118.  (5) On the three rows directly below *British Pounds enter the data for
  119. the three Measures like this:
  120.  
  121.   20 Shillings
  122.   100 Pence              These numbers may be totally wrong.
  123.   400 Farthings
  124.  
  125. Note that there is ONE space between the number and the Measure on each
  126. line.  Do not leave any blank lines in the file.
  127.  
  128.  (6) When done editing the file, save it as a TWS screen-code file.  This
  129. isn't necessary, but it's handy to have a "source" file like this for the
  130. next time you feel like adding some measures.  Then you can skip the first
  131. three steps above.
  132.  
  133.  (7) Go to the TWS Print Menu and set the left, right, top and bottom
  134. margins to 0.  You can also do this by using reversed lm, rm, tm and bm
  135. codes in the text itself.
  136.  
  137.  (8) Print the file to disk with this filename:  @0:conv data,p,w
  138. If there are fewer than 47 blocks free on the disk, you'll have to scratch
  139. "conv data" first then save.  The "@0" (save with replace) syntax requires
  140. that there be as many blocks free on a disk as the size of the file being
  141. replaced.
  142.  
  143.     That's it!  You're done and the program will now have British Pounds in
  144. the B window.  I've DIMensioned the variables in line 140 in the program
  145. for 800 total lines of factors, and 110 different B window measures.  If
  146. you get a "bad subscript error" you probably have added enough items to
  147. cause a problem.  Simply increase the values in line 140 until you don't
  148. get the error.
  149.  
  150.     If you want to add extra conversions to measures that already have an
  151. asterisk before them, just insert the new conversion factor and measure
  152. below it on the list.
  153.  
  154.     To edit the program itself ("95 convertible") you MUST first run it and
  155. break out with STOP-RESTORE.  Do not save the program without running it or
  156. CONTROL80's commands will be tokenized improperly and the program will no
  157. longer run.  An easy way to save it is to
  158.  
  159.   goto10000
  160.  
  161.  
  162.  WRAPUP
  163.  ------
  164.  
  165.     That's all there is to it.  It's a simple math program but it could
  166. come in handy some day.  Not everybody has a pocket-sized POCKET REF on
  167. hand at all times.   I want to thank Nina Kreigh for her excellent work.
  168. She went over those multi-digit numbers with a fine-toothed comb so you can
  169. be almost 100% certain they are as accurate as the Glover book is.  And
  170. unlike $3000 Pentiums with Intel chips, your C-128 will handle the math
  171. accurately.
  172.  
  173. FT
  174.  
  175.